package com.info.widgets.ReportAbuse;

import java.util.ArrayList;
import java.util.List;
import java.sql.*;

import com.info.widgets.ConnectionHelper;
import com.info.widgets.DAOException;
import com.info.widgets.ReportAbuse.ReportAbuse;
public class ReportAbuseService {
	
	public ArrayList<ReportAbuse> ReportCreation(ReportAbuse abuse) throws DAOException{
		System.out.println("ReportAbuseCreation");
		ReportAbuse abuse1=new ReportAbuse();
		Connection con=null;
		String dbtime=null;
		//String query="SELECT * FROM mycaspian.feedback";
		ArrayList<ReportAbuse> arrayList = new ArrayList<ReportAbuse>();
		try {
			con=ConnectionHelper.getConnection();
			Statement stmt=con.createStatement();
			//ResultSet rs=stmt.executeQuery(query);
			PreparedStatement pst = null;
			pst = con.prepareStatement("INSERT INTO Reportabuse (linkofmaterial, yourname, youremailaddress, organization, descriptionabuse) VALUES(?, ?, ?, ?, ?)");

			
			//pst.setString(1,abuse.g x)
			
			 
			pst.executeUpdate();
			} catch (Exception e) {
			e.printStackTrace();
			throw new DAOException(e);
		} finally {
			ConnectionHelper.close(con);
		}
		return arrayList;
}
}